<template>
  <div class="loading-mask" v-show="show">
    <div class="loader">
      <img src="/images/loading.gif" alt="loading">
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        show: false
      }
    },
    methods: {
      update(options) {
        this.show = options.show
      }
    }
  }

</script>

<style lang="scss" scoped>
  @import '../../styles/libs/variable';

  .loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .loader {
      flex-shrink: 0;
      height: 2rem;
      text-align: center;
      img {
        height: 100%;
      }
    }
  }

</style>
